#include <asm.h>
#include <regdef.h>
#include <inst_test.h>

LEAF(n15_jr_test)
    .set noreorder
    addiu s0, s0 ,1
    li  s2, 0x0
###test inst
    TEST_JR(0xc21e6e78, 0x0e2ea248, 0xc21e6e78, 0x0e2ea248)
    TEST_JR(0x6793c49c, 0x654b2d70, 0x6793c49c, 0x654b2d70)
    TEST_JR(0xff0a08b0, 0x50d2bb38, 0xff0a08b0, 0x50d2bb38)
    TEST_JR(0x70640e44, 0x391afbca, 0x70640e44, 0x391afbca)
    TEST_JR(0x0506233b, 0xb14115a8, 0x0506233b, 0xb14115a8)
    TEST_JR(0x9c781547, 0xde178220, 0x9c781547, 0xde178220)
    TEST_JR(0xa8dd2c05, 0xfb3d8034, 0xa8dd2c05, 0xfb3d8034)
    TEST_JR(0x01c45860, 0x6bdc4550, 0x01c45860, 0x6bdc4550)
    TEST_JR(0x47d1c1c0, 0xf853cd8e, 0x47d1c1c0, 0xf853cd8e)
    TEST_JR(0x7089b600, 0xb8da1d86, 0x7089b600, 0xb8da1d86)
    TEST_JR(0x7292aac0, 0x0e66c29a, 0x7292aac0, 0x0e66c29a)
    TEST_JR(0x8c9bab9e, 0x32b27d8c, 0x8c9bab9e, 0x32b27d8c)
    TEST_JR(0x1bac298c, 0x64cd8070, 0x1bac298c, 0x64cd8070)
    TEST_JR(0xf6cca88d, 0x57d64306, 0xf6cca88d, 0x57d64306)
    TEST_JR(0xb792bde0, 0x0ac1da9a, 0xb792bde0, 0x0ac1da9a)
    TEST_JR(0xd6945e3f, 0x4a8ca140, 0xd6945e3f, 0x4a8ca140)
    TEST_JR(0x6c8b4b9e, 0xa614d1d3, 0x6c8b4b9e, 0xa614d1d3)
    TEST_JR(0xb1ba84c0, 0xdebf6380, 0xb1ba84c0, 0xdebf6380)
    TEST_JR(0x90901228, 0x33c32888, 0x90901228, 0x33c32888)
    TEST_JR(0xc7eb69e0, 0x58796a6c, 0xc7eb69e0, 0x58796a6c)
    TEST_JR(0x549ec268, 0xc98b6a8a, 0x549ec268, 0xc98b6a8a)
    TEST_JR(0xfb010550, 0x5114cdbc, 0xfb010550, 0x5114cdbc)
    TEST_JR(0x62bc6ba6, 0x7be64fa2, 0x62bc6ba6, 0x7be64fa2)
    TEST_JR(0xbf3ba098, 0x0cd83240, 0xbf3ba098, 0x0cd83240)
    TEST_JR(0x3e1a96ec, 0x5eb2c340, 0x3e1a96ec, 0x5eb2c340)
    TEST_JR(0x3a7da350, 0xd06a825a, 0x3a7da350, 0xd06a825a)
    TEST_JR(0xb2d932b0, 0xc243527a, 0xb2d932b0, 0xc243527a)
    TEST_JR(0xb1810096, 0x072eceb0, 0xb1810096, 0x072eceb0)
    TEST_JR(0x8123d3a0, 0x40cd5ed8, 0x8123d3a0, 0x40cd5ed8)
    TEST_JR(0x64884488, 0x5f7312da, 0x64884488, 0x5f7312da)
    TEST_JR(0x70239b80, 0x33392afc, 0x70239b80, 0x33392afc)
    TEST_JR(0x6298a0cc, 0x893efc1b, 0x6298a0cc, 0x893efc1b)
    TEST_JR(0xb00f60cd, 0x65c1af16, 0xb00f60cd, 0x65c1af16)
    TEST_JR(0x08237624, 0x38c0ece0, 0x08237624, 0x38c0ece0)
    TEST_JR(0x2dfee5be, 0xe51d75a0, 0x2dfee5be, 0xe51d75a0)
    TEST_JR(0x2ca5486c, 0x78056284, 0x2ca5486c, 0x78056284)
    TEST_JR(0x6770ec50, 0x2d3c4286, 0x6770ec50, 0x2d3c4286)
    TEST_JR(0xb37c8454, 0x4c6533f3, 0xb37c8454, 0x4c6533f3)
    TEST_JR(0x20aa0280, 0x4d845d70, 0x20aa0280, 0x4d845d70)
    TEST_JR(0x557c66c0, 0x01ba81a4, 0x557c66c0, 0x01ba81a4)
    TEST_JR(0x4819c4f0, 0x68fa809c, 0x4819c4f0, 0x68fa809c)
    TEST_JR(0xba2a1bbc, 0xe5a72720, 0xba2a1bbc, 0xe5a72720)
    TEST_JR(0x94a85658, 0x06ef5a14, 0x94a85658, 0x06ef5a14)
    TEST_JR(0x4729cab8, 0xdcc9db9c, 0x4729cab8, 0xdcc9db9c)
    TEST_JR(0xf29a1c5c, 0xc9d1a960, 0xf29a1c5c, 0xc9d1a960)
    TEST_JR(0x363e9340, 0x463f7863, 0x363e9340, 0x463f7863)
    TEST_JR(0xc029cea0, 0x3f18b948, 0xc029cea0, 0x3f18b948)
    TEST_JR(0x6529aa00, 0x89b721fc, 0x6529aa00, 0x89b721fc)
    TEST_JR(0xa3d411de, 0xf4223eae, 0xa3d411de, 0xf4223eae)
    TEST_JR(0x90a7772f, 0x0b2580ba, 0x90a7772f, 0x0b2580ba)
    TEST_JR(0x637d9eba, 0x392682d4, 0x637d9eba, 0x392682d4)
    TEST_JR(0x089619d0, 0xca330c5b, 0x089619d0, 0xca330c5b)
    TEST_JR(0x3153acc0, 0xd82d2884, 0x3153acc0, 0xd82d2884)
    TEST_JR(0xc3e2c3c8, 0xd4573f50, 0xc3e2c3c8, 0xd4573f50)
    TEST_JR(0x5ddc207b, 0x31e50dad, 0x5ddc207b, 0x31e50dad)
    TEST_JR(0xda24472c, 0xdb1eeac0, 0xda24472c, 0xdb1eeac0)
    TEST_JR(0x2efe847d, 0xe5d6d5be, 0x2efe847d, 0xe5d6d5be)
    TEST_JR(0xb6949ab3, 0xb1e89022, 0xb6949ab3, 0xb1e89022)
    TEST_JR(0x3fe1f2a0, 0xc026ca09, 0x3fe1f2a0, 0xc026ca09)
    TEST_JR(0x839099b4, 0xb34f4200, 0x839099b4, 0xb34f4200)
    TEST_JR(0x0309efb3, 0x3d90e910, 0x0309efb3, 0x3d90e910)
    TEST_JR(0xcf4e331c, 0xf96662d4, 0xcf4e331c, 0xf96662d4)
    TEST_JR(0x31fe18a8, 0xea76604d, 0x31fe18a8, 0xea76604d)
    TEST_JR(0x437850a5, 0xafc84cc0, 0x437850a5, 0xafc84cc0)
    TEST_JR(0x305fe32c, 0x9958bca0, 0x305fe32c, 0x9958bca0)
    TEST_JR(0x6819c7ac, 0x72ae5be8, 0x6819c7ac, 0x72ae5be8)
    TEST_JR(0xbc483294, 0x5ee9cab7, 0xbc483294, 0x5ee9cab7)
    TEST_JR(0x992ca086, 0xdb12ba3e, 0x992ca086, 0xdb12ba3e)
    TEST_JR(0x4815f586, 0x601e841c, 0x4815f586, 0x601e841c)
    TEST_JR(0xd72ede76, 0x38398460, 0xd72ede76, 0x38398460)
    TEST_JR(0xfd780804, 0xd267e691, 0xfd780804, 0xd267e691)
    TEST_JR(0x14b67f0f, 0x4af4a348, 0x14b67f0f, 0x4af4a348)
    TEST_JR(0x1180a96c, 0xd3877780, 0x1180a96c, 0xd3877780)
    TEST_JR(0x36e5c8b0, 0x8919ab62, 0x36e5c8b0, 0x8919ab62)
    TEST_JR(0xebe41ae0, 0xb1ec9648, 0xebe41ae0, 0xb1ec9648)
    TEST_JR(0x4ea5e93c, 0x06d5f244, 0x4ea5e93c, 0x06d5f244)
    TEST_JR(0xdf92436a, 0x4b4f58bc, 0xdf92436a, 0x4b4f58bc)
    TEST_JR(0xa0461040, 0x8238a17c, 0xa0461040, 0x8238a17c)
    TEST_JR(0xbca832fa, 0xc098cecc, 0xbca832fa, 0xc098cecc)
    TEST_JR(0xcc4dc3c0, 0xa9745af0, 0xcc4dc3c0, 0xa9745af0)
    TEST_JR(0x236977c8, 0xc8057a46, 0x236977c8, 0xc8057a46)
    TEST_JR(0x8b7b85f2, 0xc72b74a0, 0x8b7b85f2, 0xc72b74a0)
    TEST_JR(0xe8a90d98, 0xdaafb741, 0xe8a90d98, 0xdaafb741)
    TEST_JR(0xa7e7b2b1, 0x5c3340d2, 0xa7e7b2b1, 0x5c3340d2)
    TEST_JR(0x205854d0, 0x7e623f9b, 0x205854d0, 0x7e623f9b)
    TEST_JR(0xc8fd1218, 0x29c82be4, 0xc8fd1218, 0x29c82be4)
    TEST_JR(0x248cbb10, 0x04e61518, 0x248cbb10, 0x04e61518)
    TEST_JR(0x4e681e00, 0x05eb4288, 0x4e681e00, 0x05eb4288)
    TEST_JR(0xf9237e68, 0xb2783f58, 0xf9237e68, 0xb2783f58)
    TEST_JR(0x2902d948, 0x72a71480, 0x2902d948, 0x72a71480)
    TEST_JR(0xe24e54f0, 0xa6d166cc, 0xe24e54f0, 0xa6d166cc)
    TEST_JR(0x2627dbca, 0x556dff0c, 0x2627dbca, 0x556dff0c)
    TEST_JR(0x83ce7672, 0xe3fc075d, 0x83ce7672, 0xe3fc075d)
    TEST_JR(0x9b268b70, 0xeaed5ca8, 0x9b268b70, 0xeaed5ca8)
    TEST_JR(0x358514a0, 0xf11483e7, 0x358514a0, 0xf11483e7)
    TEST_JR(0xee61423b, 0x282e3580, 0xee61423b, 0x282e3580)
    TEST_JR(0xdccfd296, 0xd26d5480, 0xdccfd296, 0xd26d5480)
    TEST_JR(0x29be8f01, 0x4955d3eb, 0x29be8f01, 0x4955d3eb)
    TEST_JR(0xb06936c0, 0x9166ccc0, 0xb06936c0, 0x9166ccc0)
    TEST_JR(0xe9b5cca8, 0xbbf09201, 0xe9b5cca8, 0xbbf09201)
    TEST_JR(0x544f5380, 0x97e8441a, 0x544f5380, 0x97e8441a)
    TEST_JR(0x8cff33f7, 0x85e94ea8, 0x8cff33f7, 0x85e94ea8)
    TEST_JR(0x2f42c720, 0xaff050dc, 0x2f42c720, 0xaff050dc)
    TEST_JR(0x357ffcc0, 0xe2725c22, 0x357ffcc0, 0xe2725c22)
    TEST_JR(0xf0653e7f, 0x7fe65b38, 0xf0653e7f, 0x7fe65b38)
    TEST_JR(0x75be951c, 0x13ed14e8, 0x75be951c, 0x13ed14e8)
    TEST_JR(0x49547b18, 0xd762dc10, 0x49547b18, 0xd762dc10)
    TEST_JR(0x70fec57a, 0x90482cbe, 0x70fec57a, 0x90482cbe)
    TEST_JR(0xe61b2f08, 0xea0a3b7e, 0xe61b2f08, 0xea0a3b7e)
    TEST_JR(0x33651ede, 0x26ccb363, 0x33651ede, 0x26ccb363)
    TEST_JR(0x95f50600, 0x91b7fe70, 0x95f50600, 0x91b7fe70)
    TEST_JR(0x6dc49bfc, 0xa48ee500, 0x6dc49bfc, 0xa48ee500)
    TEST_JR(0x23be8800, 0x3b316965, 0x23be8800, 0x3b316965)
    TEST_JR(0xac0399e8, 0xa8543092, 0xac0399e8, 0xa8543092)
    TEST_JR(0xbc7b4a80, 0xa4d67100, 0xbc7b4a80, 0xa4d67100)
    TEST_JR(0x781b8190, 0x5b4d8a31, 0x781b8190, 0x5b4d8a31)
    TEST_JR(0xe0e63b40, 0x4c2f352c, 0xe0e63b40, 0x4c2f352c)
    TEST_JR(0xf12d68c4, 0x41cbf8c8, 0xf12d68c4, 0x41cbf8c8)
    TEST_JR(0x1ed1d128, 0x500d40f8, 0x1ed1d128, 0x500d40f8)
    TEST_JR(0xae9dd038, 0x688b8be2, 0xae9dd038, 0x688b8be2)
    TEST_JR(0xdf3bcb3d, 0xc7175e68, 0xdf3bcb3d, 0xc7175e68)
    TEST_JR(0x5813b77e, 0xc2a2c3e6, 0x5813b77e, 0xc2a2c3e6)
    TEST_JR(0x1ec9f890, 0x16f67880, 0x1ec9f890, 0x16f67880)
    TEST_JR(0xfedef1a8, 0xfac20a98, 0xfedef1a8, 0xfac20a98)
    TEST_JR(0x73d8ff9f, 0x9b548d8e, 0x73d8ff9f, 0x9b548d8e)
    TEST_JR(0xefcf97c0, 0xda4381ca, 0xefcf97c0, 0xda4381ca)
    TEST_JR(0xfb8a58f0, 0x93320d80, 0xfb8a58f0, 0x93320d80)
    TEST_JR(0x7048ea70, 0x33d2c620, 0x7048ea70, 0x33d2c620)
    TEST_JR(0x5378f23e, 0xfdf97c20, 0x5378f23e, 0xfdf97c20)
    TEST_JR(0x0cdfdc00, 0x51cffb64, 0x0cdfdc00, 0x51cffb64)
    TEST_JR(0x76b047e0, 0xf24dc540, 0x76b047e0, 0xf24dc540)
    TEST_JR(0x7adc9690, 0x5add8e08, 0x7adc9690, 0x5add8e08)
    TEST_JR(0x933e9498, 0x941709d0, 0x933e9498, 0x941709d0)
    TEST_JR(0xad2d6f80, 0xeea32370, 0xad2d6f80, 0xeea32370)
    TEST_JR(0xe502ad76, 0x4a76af5c, 0xe502ad76, 0x4a76af5c)
    TEST_JR(0x33d88514, 0xcc8e2034, 0x33d88514, 0xcc8e2034)
    TEST_JR(0xdd0c2b1c, 0xaf9b3df0, 0xdd0c2b1c, 0xaf9b3df0)
    TEST_JR(0x4ae71680, 0xdfa6fd40, 0x4ae71680, 0xdfa6fd40)
    TEST_JR(0xc6f725de, 0x7acd6378, 0xc6f725de, 0x7acd6378)
    TEST_JR(0xdbe4cb34, 0xb66e9b84, 0xdbe4cb34, 0xb66e9b84)
    TEST_JR(0x5b4be384, 0xedd92dd4, 0x5b4be384, 0xedd92dd4)
    TEST_JR(0x87151984, 0x381fd770, 0x87151984, 0x381fd770)
###detect exception
    bne s2, zero, inst_error
    nop
###score ++
    addiu s3, s3, 1
###output (s0<<24)|s3
inst_error:  
    sll t1, s0, 24
    or t0, t1, s3 
    sw t0, 0(s1)
    jr ra
    nop
END(n15_jr_test)
